<?php
namespace App\Http\Controllers;

use Illuminate\Http\Request;

class PageController extends Controller
{
    public function error(Request $request)
    {
        $message = '系统错误，请稍后再试';
        if ($request->session()->has('message')) {
            $message = $request->session()->get('message');
        }
        $request->session()->flash('message', $message);
        return view($this->view_dir.'.auth.error');
    }

    public function sso_logout_witherror(Request $request)
    {
        $message = '抱歉，您暂时无法进入该系统，如有问题请联系管理员。';
        if ($request->session()->has('message')) {
            $message = $request->session()->get('message');
        }
        $request->session()->flash('message', $message);
        $caslogout_route = admin_route('auth.sso.logout');
        return  view($this->view_dir.'.auth.sso_logout_witherror', compact('caslogout_route'));
    }
}
